
public class DEFfunctionStrings {
	public static String padLFunction = "<xsl:function name=\"mismo:cOnePADL\">"
			+ "<xsl:param name=\"length\"/>"
			+ "<xsl:param name=\"string\"/>"
			+ "<xsl:param name=\"character\"/>"
			+ "<xsl:choose>"
			+ "<xsl:when test=\"string-length($string) &lt; $length\">"
			+ "<xsl:value-of select=\"mismo:cOnePADL($length,concat(mismo:getCharacterValue($character),$string),$character)\"/>"
			+ "</xsl:when>"
			+ "<xsl:otherwise>"
			+ "<xsl:value-of select=\"substring($string,1+string-length($string)-$length,$length)\"/>"
			+ "</xsl:otherwise>" + "</xsl:choose>" + "</xsl:function>";
	public static String padRFunction = "<xsl:function name=\"mismo:cOnePADR\">"
			+ "<xsl:param name=\"length\"/>"
			+ "<xsl:param name=\"string\"/>"
			+ "<xsl:param name=\"character\"/>"
			+ "<xsl:choose>"
			+ "<xsl:when test=\"string-length($string) &lt; $length\">"
			+ "<xsl:value-of select=\"mismo:cOnePADR($length,concat($string,mismo:getCharacterValue($character)),$character)\"/>"
			+ "</xsl:when>" + "<xsl:otherwise>"
			+ "<xsl:value-of select=\"substring($string,1,$length)\"/>"
			+ "</xsl:otherwise>" + "</xsl:choose>" + "</xsl:function>";
	public static String getCharValueFunction = "<xsl:function name=\"mismo:getCharacterValue\">"
			+ "<xsl:param name=\"character\"/>"
			+ "<xsl:variable name=\"ascii\">&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#33;&#34;&#35;&#36;&#37;&#38;&#39;&#40;&#41;&#42;&#43;&#44;&#45;&#46;&#47;&#48;&#49;&#50;&#51;&#52;&#53;&#54;&#55;&#56;&#57;&#58;&#59;&#60;&#61;&#62;&#63;&#64;&#65;&#66;&#67;&#68;&#69;&#70;&#71;&#72;&#73;&#74;&#75;&#76;&#77;&#78;&#79;&#80;&#81;&#82;&#83;&#84;&#85;&#86;&#87;&#88;&#89;&#90;&#91;&#92;&#93;&#94;&#95;&#96;&#97;&#98;&#99;&#100;&#101;&#102;&#103;&#104;&#105;&#106;&#107;&#108;&#109;&#110;&#111;&#112;&#113;&#114;&#115;&#116;&#117;&#118;&#119;&#120;&#121;&#122;&#123;&#124;&#125;&#126;</xsl:variable>"
			+ "<xsl:value-of select=\"substring($ascii,$character,1)\"/>"
			+ "</xsl:function>";
	public static String dateMathFunction = "<xsl:function name=\"mismo:cOneDATEMATH\">"
			+ "<xsl:param name=\"date\"/>"
			+ "<xsl:param name=\"days\"/>"
			+ "<xsl:param name=\"months\"/>"
			+ "<xsl:param name=\"years\"/>"
			+ "<xsl:variable name=\"dateTotal\" select=\"xs:date($date)\"/>"
			+ // use for FMT Date
			"<xsl:variable name=\"dayDuration\">"
			+ "<xsl:choose>"
			+ "<xsl:when test=\"$days &lt; 0\">"
			+ "<xsl:variable name=\"negDays\" select=\"$days * -1\"/>"
			+ "<xsl:copy-of select=\"concat('-P',$negDays,'D')\"/>"
			+ "</xsl:when>"
			+ "<xsl:otherwise>"
			+ "<xsl:copy-of select=\"concat('P',$days,'D')\"/>"
			+ "</xsl:otherwise>"
			+ "</xsl:choose>"
			+ "</xsl:variable>"
			+ "<xsl:variable name=\"monthDuration\">"
			+ "<xsl:choose>"
			+ "<xsl:when test=\"$months &lt; 0\">"
			+ "<xsl:variable name=\"negMonths\" select=\"$months * -1\"/>"
			+ "<xsl:copy-of select=\"concat('-P',$negMonths,'M')\"/>"
			+ "</xsl:when>"
			+ "<xsl:otherwise>"
			+ "<xsl:copy-of select=\"concat('P',$months,'M')\"/>"
			+ "</xsl:otherwise>"
			+ "</xsl:choose>"
			+ "</xsl:variable>"
			+ "<xsl:variable name=\"yearDuration\">"
			+ "<xsl:choose>"
			+ "<xsl:when test=\"$years &lt; 0\">"
			+ "<xsl:variable name=\"negYears\" select=\"$years * -1\"/>"
			+ "<xsl:copy-of select=\"concat('-P',$negYears,'Y')\"/>"
			+ "</xsl:when>"
			+ "<xsl:otherwise>"
			+ "<xsl:copy-of select=\"concat('P',$years,'Y')\"/>"
			+ "</xsl:otherwise>"
			+ "</xsl:choose>"
			+ "</xsl:variable>"
			+ "<xsl:value-of select=\"$dateTotal + xs:yearMonthDuration($yearDuration) + xs:yearMonthDuration($monthDuration) + xs:dayTimeDuration($dayDuration)\"/>"
			+ "</xsl:function>";
	public static String cutFunction = "<xsl:function name=\"mismo:cOneCUT\">"
			+ "<xsl:param name=\"string\"/>"
			+ "<xsl:param name=\"start\"/>"
			+ "<xsl:param name=\"end\"/>"
			+ "<xsl:variable name=\"length\" select=\"1 + $end - $start\"/>"
			+ "<xsl:value-of select=\"substring($string,$start,$length)\"/>"
			+ "</xsl:function>";
	public static String getDateFromMMDDYYYY = " <xsl:function name=\"mismo:getDateFromMMDDYYYY\">"
			+ "<xsl:param name=\"date\"/>"
			+ "<xsl:variable name=\"month\" select=\"substring($date,1,2)\"/>"
			+ "<xsl:variable name=\"day\" select=\"substring($date,4,2)\"/>"
			+ "<xsl:variable name=\"year\" select=\"substring($date,7,4)\"/>"
			+ "<xsl:variable name=\"date2\" select=\"concat($year,'-',$month,'-',$day)\"/>"
			+ "<xsl:variable name=\"dateTrue\" select=\"xs:date($date2)\"/>"
			+ "<xsl:value-of select=\"$dateTrue\"/>" + "</xsl:function>";
	public static String fmtDateFunction = " <xsl:function name=\"mismo:convertToDate\">"
			+ "<xsl:param name=\"date\"/>"
			+ "<xsl:variable name=\"month\" select=\"substring($date,1,2)\"/>"
			+ "<xsl:variable name=\"day\" select=\"substring($date,4,2)\"/>"
			+ "<xsl:variable name=\"year\" select=\"substring($date,7,4)\"/>"
			+ "<xsl:variable name=\"date2\" select=\"concat($year,'-',$month,'-',$day)\"/>"
			+ "<xsl:variable name=\"dateTrue\" select=\"xs:date($date2)\"/>"
			+ "<xsl:value-of select=\"$dateTrue\"/>" + "</xsl:function>";
}
